package com.example.friendfindertwo.data.helper;

import android.content.Context;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;

public class AbstractDAO {

	static SQLiteDatabase database;
	private static DBHelper dbHelper;
	
	public static void open(Context context) throws SQLException{
		if(database == null || !database.isOpen()){
			dbHelper = new DBHelper(context);
			database = dbHelper.getWritableDatabase();
		}
	}
	
	public static void close(){
		dbHelper.close();
	}

}
